import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    linkActiveClass:'active',
  routes: [
    {
      path: '/',
      redirect:'/main/news'
    },
    {
        path:'/detail/:id',
        component:() => import('@/views/detail')
    },
    {
        path:'/main',
        component:() => import('@/views/main'),
        children:[
            {
                path:'/main/home',
                component:() => import('@/views/home')
            },
            {
                path:'/main/movie',
                component:() => import('@/views/movie'),
            },
            {
                path:'/main/news',
                component:() => import('@/views/news'),
            },
            {
                path:'/main/comment',
                component:() => import('@/views/comment'),
            },
            {
                path:'/main/data',
                component:() => import('@/views/data'),
            }
        ]
    }
  ]
})
